-
Notifications
You must be signed in to change notification settings - Fork 185
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Make dependancy adal optional
Verify-boilerplate script
Ok, i think I now signed the cla, hope the bot will reconcile that. |
The watch code reset the version to the last found in the response. When you first list existing objects and then start watching from that resource version the existing versions are older than the version you wanted and the watch starts from the wrong version after the first restart. This leads to for example already deleted objects ending in the stream again. Fix this by setting the minimum resource version to reset from to the input resource version. As long as k8s returns all objects in order in the watch this should work. We cannot use the integer value of the resource version to order it as one should be treat the value as opaque. Closes kubernetes-client/python#700
fix watching with a specified resource version
stream/ws_client.py
Outdated
index = data.find("\n") | ||
newline_symbol = "\n" | ||
if six.PY3: | ||
newline_Symbol = b"\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although it does the same thing, I wonder why you applied different logic compared to Line 44. Also, be careful about your variable name: do you mean newline_symbol
instead of a capitalized S?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uh-oh, my bad, fixed that. i'll test this code tomorrorow.
and it'd be great if you could judge the solution to decoding errors itself, it bothers me more than anything else :) maybe you will find solution from #104 better than this one
Also, it doesn't seem like your CLA has been updated yet. You sure you signed it? |
tx to micw comments
thought i signed it. now signed for sure, and email/uid match. i hope bot will recognize that |
``` Traceback (most recent call last): File "controller_unitproject/run.py", line 33, in <module> run() File "controller_unitproject/run.py", line 29, in run unitproject.run() File "/home/bajal/.local/share/virtualenvs/controller_unitproject-1u3cbEWP/lib/python3.7/site-packages/module_k8s_controller_sdk/controller.py", line 215, in run self.resync_and_watch() File "/home/bajal/.local/share/virtualenvs/controller_unitproject-1u3cbEWP/lib/python3.7/site-packages/module_k8s_controller_sdk/controller.py", line 209, in resync_and_watch from_version=last_known_resource_version File "/home/bajal/.local/share/virtualenvs/controller_unitproject-1u3cbEWP/lib/python3.7/site-packages/module_k8s_controller_sdk/watcher.py", line 92, in watch self.__watch(seconds_to_out) File "/home/bajal/.local/share/virtualenvs/controller_unitproject-1u3cbEWP/lib/python3.7/site-packages/module_k8s_controller_sdk/watcher.py", line 51, in __watch for event in stream: File "/home/bajal/.local/share/virtualenvs/controller_unitproject-1u3cbEWP/lib/python3.7/site-packages/kubernetes/watch/watch.py", line 130, in stream for line in iter_resp_lines(resp): File "/home/bajal/.local/share/virtualenvs/controller_unitproject-1u3cbEWP/lib/python3.7/site-packages/kubernetes/watch/watch.py", line 47, in iter_resp_lines seg = seg.decode('utf8') UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 2047: unexpected end of data ```
Fixed one more bug about decoding - now inside watch.py. |
commented in #104 (comment). I think we should decode utf8 only if opcode is |
feat: merging kubeconfig files
Hey guys, what else can I do to help with this one? @roycaihw ? |
…_credentials_refresh Add email scope to GCP provided credential refresh
I dunno if it is acceptable to up threads, but it would be nice to get any answer ^_^ |
@dbazhal sorry for the late reply. I will review this pull this week |
just another firendly reminder :) |
@dbazhal my apologies.. was busy with k/k 1.15 freeze. Please take a look at #104 (comment). I think |
Fix base64 padding for kube config
tx to micw comments
``` Traceback (most recent call last): File "controller_unitproject/run.py", line 33, in <module> run() File "controller_unitproject/run.py", line 29, in run unitproject.run() File "/home/bajal/.local/share/virtualenvs/controller_unitproject-1u3cbEWP/lib/python3.7/site-packages/module_k8s_controller_sdk/controller.py", line 215, in run self.resync_and_watch() File "/home/bajal/.local/share/virtualenvs/controller_unitproject-1u3cbEWP/lib/python3.7/site-packages/module_k8s_controller_sdk/controller.py", line 209, in resync_and_watch from_version=last_known_resource_version File "/home/bajal/.local/share/virtualenvs/controller_unitproject-1u3cbEWP/lib/python3.7/site-packages/module_k8s_controller_sdk/watcher.py", line 92, in watch self.__watch(seconds_to_out) File "/home/bajal/.local/share/virtualenvs/controller_unitproject-1u3cbEWP/lib/python3.7/site-packages/module_k8s_controller_sdk/watcher.py", line 51, in __watch for event in stream: File "/home/bajal/.local/share/virtualenvs/controller_unitproject-1u3cbEWP/lib/python3.7/site-packages/kubernetes/watch/watch.py", line 130, in stream for line in iter_resp_lines(resp): File "/home/bajal/.local/share/virtualenvs/controller_unitproject-1u3cbEWP/lib/python3.7/site-packages/kubernetes/watch/watch.py", line 47, in iter_resp_lines seg = seg.decode('utf8') UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 2047: unexpected end of data ```
Following comment #112 (comment) Tested on running controller.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dbazhal The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Related to #88 and #104
I suppose decoding complete data is better than decoding data chunks.
Would be nice to get review from @mbohlool and @saberuster